<template>
  <div class="app">
    <h1>app</h1>
    <div>
      {{ msg }}
      <hr />
      {{ msg2 }}
    </div>
  </div>
</template>
<script>
// setup 里面执行的速度比created 快
// setup 里面没有this
export default {
  data() {
    return {
      msg: 'hello vue3',
    }
  },
  created() {
    console.log(this)
    console.log('created')
  },
  setup() {
    const msg2 = 'hello vue3 setup'
    console.log(this)
    console.log('setup')
    return {
      msg2,
    }
  },
}
</script>
<style
  lang="scss"
  scoped
></style>
